package com.example.demo.client.vm.sysbasequery;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;

@ApiModel("系统常量类")
public class SystemConfigVm implements Serializable {
    private static final long serialVersionUID = 1829047538778523735L;
    @ApiModelProperty("常量ID，主键")
    private Long id;
    @ApiModelProperty("常量KEY")
    private String key;
    @ApiModelProperty("常量VALUE")
    private String value;
    @ApiModelProperty(value = "常量描述",notes = "配置项来源标识")
    private String desc;
    @ApiModelProperty("是否启用")
    private Integer enable;
    @ApiModelProperty(value = "是否删除", notes = "D为逻辑删除")
    private String status;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Integer getIntegerValue() {
        try {
            return StringUtils.isBlank(value) ? null
                    : Integer.valueOf(value);
        } catch (Exception e) {

        }
        return null;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer isEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "SystemConfigVm{" +
                "id=" + id +
                ", key='" + key + '\'' +
                ", value='" + value + '\'' +
                ", desc='" + desc + '\'' +
                ", enable=" + enable +
                ", status='" + status + '\'' +
                '}';
    }
}
